]> dgit.raspbian.org Git - gnome-shell.git/commit
animationUtils: Skip no-op wiggle to avoid cancelling pending transitions
authorJoan Torres Lopez <joantolo@redhat.com>
Tue, 5 May 2026 15:26:27 +0000 (17:26 +0200)
committerMarge Bot <marge-bot@gnome.org>
Thu, 14 May 2026 18:26:03 +0000 (18:26 +0000)
commit352a572b22e8bde1fc45eb999b067a29c6939bad
tree8d2b851d5aaf0cec93fdf2af3e37fa409c64791e
parent45e7d444cabba2c1e7b45cd80f9297c099907dba
animationUtils: Skip no-op wiggle to avoid cancelling pending transitions

When wiggle() is called with duration 0, the async easeAsync calls
yield between microtasks, leaving pending operations that remove
transitions on the same property. This becomes a problem when two
setMessage() calls happen in the same call stack (e.g. via
_queuePriorityMessage): the first fires a no-op wiggle(dur:0) and
the second starts the real wiggle(dur:65). When microtasks drain,
the first wiggle's pending easeAsync calls overwrite the second
wiggle's active transition, effectively cancelling the real animation.

Return early when duration is 0, since the animation is a no-op anyway.

Fixes: fdadbb7a5a2 ("animationUtils: Use easeAsync() for wiggle")
Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/work_items/9207
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/4209>
js/misc/animationUtils.js